package com.fa4j.product.item.repository.impl;

import com.fa4j.common.data.repository.impl.BaseRepositoryImpl;
import com.fa4j.product.item.model.Item;
import com.fa4j.product.item.repository.ItemRepository;
import com.fa4j.product.item.repository.mapper.ItemMapper;
import org.springframework.stereotype.Repository;

/**
 * 持久化接口实现-商品信息
 *
 * @since 2025-11-22 21:06:24
 */
@Repository
public class ItemRepositoryImpl extends BaseRepositoryImpl<ItemMapper, Item> implements ItemRepository {

    @Override
    public long countByCategoryId(Integer categoryId) {
        return super.lambdaQuery().eq(Item::getCategoryId, categoryId).count();
    }
}


